#ifndef __MESSAGE_H__
#define __MESSAGE_H__
#include "util.hpp"
#include "logLevel.hpp"
#include <thread>

namespace sqy_log
{
    struct LogMsg
    {
        time_t _ctime;//日志产生的时间戳
        LogLevel::value _level;//日志等级
        size_t _line;//行号
        std::string _file;//文件名
        std::string _logger;//日志器名称
        std::string _payload;//有效消息数据
        std::thread::id _tid;//线程ID

        LogMsg(LogLevel::value level,
            size_t line,
            std::string file,
            std::string logger,
            std::string payload
            )
            :_ctime(util::Date::now())
            ,_tid(std::this_thread::get_id())
            ,_line(line)
            ,_file(file)
            ,_logger(logger)
            ,_payload(payload)
            ,_level(level)
            {}
    };
} 


#endif